const fs = require('fs');
const path = require( 'path' );

// 获得当前文件路径名称
let pathname = __filename;

console.log(`准备读取${path.basename(pathname)}文件内容`);
let content = fs.readFileSync( pathname , 'utf8' );
console.log( content );